Previous | Index | Next |

Predicate objects

Predicate objects are objects with an method compare() defined. They are important for the effective use of the library. In the places where one would expect to pass a pointer to a boolean function to a generic algorithm, the interface is specified to accept an object with an compare() defined. To enable adaptors and other components to manipulate function objects that take one or two arguments interfaces is defined
    Predicate1 api
    Predicate2 api

Comparisons

The library provides basic predicate object classes for all of the comparison operators in the language. When an arithmic function object is created, the data type that should be compared on must be specified. The function objects include
    PredEqual
    PredNotEqual
    PredGreater<type>
    PredLess<type>
    PredGreaterEqual<type>
    PredLessEqual<type>
for each type
    Character
    Integer
    Long
    Float
    Double
    String

Logical operations

The basic predicate object classes for logical operators in the language.
    PredAnd api
    PredOr api
    Not1 api
    Not2 api


Previous | Index | Next |